package com.guaoran.spring.source;

import com.guaoran.spring.demo.action.DemoAction;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

/**
 * @author : 孤傲然
 * @Description :
 * @date :2018/7/16 18:37
 */
public class XmlBeanFactorySource {
    public static void main(String[] args) {
        BeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("application-framework.xml"));
        DemoAction demoAction = (DemoAction) beanFactory.getBean("demoAction");
        demoAction.getDemoById(1L);
    }
}
